package com.chinasofti;

import java.util.Scanner;

public class Demo10 {
    public static void main(String[] args) {
        Scanner sc =  new Scanner(System.in);
        while (true){
            System.out.print("请输入一个手机号:");
            String s = sc.next();
            if(s.length()==11){
                String s1 = s.substring(0,3);
                String s2 = s.substring(7);
                System.out.println(s1+"****"+s2);
                break;
            }else {
                System.out.println("你输入的手机号码有误，请重新输入");
            }
        }

    }
}
